Pre-defined Data Elements

The ProModel tank submodel provides the following data elements for modeling tanks. Unless otherwise specified, all arrays are single-dimensional and of type integer. Initially, these arrays are 100 elements in size to allow for up to 100 locations. If you define more than 100 locations, you will need to enlarge the array or place tanks toward the beginning of the location list (within the first 100 locations).

Tank_Level array Stores the level of each tank. Since the values in this array directly control the tank gauge and tank statistics, the array MUST be present in every tank model.

Tank_State array Tracks the state of the tank.

Tank_Product array An optional array used to record or test the product currently at a tank.

Tank_Statistics array A two-dimensional array of type real used to record tank level statistics whenever the level changes. Generally, you will never need to reference this array since values automatically update when you use the pre-defined Tank subroutines. All times are in time units defined in the General Information dialog. ProModel always gathers these statistics but reports them only if you check Basic or Time Series statistics for the tank location.

Column

Description

Reset After Warm-up

1

Last level

NC

2

Last change time

Current time in time units defined in the General Information dialog

3

Cum time-weighted level

0

4

Entries

Value of column 1

5

Max contents

Value of column 1

6

Last State Change

Current time in time units defined in the General Information dialog

7

Cum time Idle

0

8

Cum time Operation

0

9

Cum time Setup

0

10

Cum time Filling

0

11

Cum time Emptying

0

12

Cum time Blocked

0

13

Cum time Down

0

14

Current downtime count

NC

As shown in the previous table, the statistics collected in the Tank_Statistics array automatically reset after any warm-up period. ProModel reports output statistics under Location statistics and Location States by Percentage. When reporting Location statistics for tanks, note the following:

Total Entries The number of units (e.g., gallons, pounds) to enter the tank.

Avg Minutes Per Entry Left blank since there is no individual entry for a tank.

Tank_Fills array An optional array used to track the number of transfers to a tank. This is especially useful when you activate multiple Tank_Fill or Tank_Transfer subroutines for a tank and you wish to know when the fills are complete. The user sets the value of Tank_Fills to zero before activating the subroutines, then defines a WAIT UNTIL statement after the ACTIVATE statement. The Tank_Fills array increments automatically when a Tank_Fill or a Tank_Transfer subroutine executes. See Tanks for additional information.